<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <link rel="stylesheet" href="./msg.css">
</head>
<body>
  <button>弹个框</button>
  <div id="t"></div>
  <script src="./msg.js"></script>
  <script>
    document.querySelector('button').addEventListener('click', function() {
      new $Msg({
        content: '真的要删除吗...',
        title: '确认删除',
        type: 'wrong',
        btnName: ['好的', '算了吧'],
        confirm: function(e) {
          console.log(this);
          console.log(e);
          new $Msg({
            content: '删除成功<span style="color: red">～</span>',
            type: 'success',
            footer: false,
            useHTML: true,
            header: false
            // contentStyle: {
            //   fontSize: '20px',
            //   color: '#32a323',
            //   textShadow: '0 0 10px #32a323'
            // }
          })
        },
        cancel: function(e) {
          document.querySelector('#t').innerHTML += '取消了，';
        }
      });
    });
  </script>
</body>
</html>